<?php
    header('Content-type:text/json');
    require "../../connection.php";
    try{
            $selectId = $_POST['selectlist'];
            $sql = 'update goods set `goods_status` = -1 where id in ('.implode(",",$selectId).")";
            $result = $conn->doSql($sql);
            if($result){
                $msg = "删除成功";
                $status = "1";
            }else{
                $msg = "删除失败";
                $status = "0";
            }
           $data = array("status"=>$status,"msg"=>$msg);
            echo json_encode($data);
    }catch(Exception $e){
        print_r($e->getMessage());
    }
?>